<template>
  <div>
    <div class="header">
      <van-search v-model="value" placeholder="请输入搜索关键词" />
    </div>
    <div class="banner">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item  v-for="(item) in arr" :key="item.id">
          <img :src="item.img" alt="" width="100%" >
        </van-swipe-item>
        
      </van-swipe>
    </div>
  </div>
</template>

<script>
import request from "@/utils/request";
export default {
  name: "Home",
  data() {
    return {
      value: '',
      arr:[]
    };
  },
  beforeCreate() {
    
  },
  created() {
  request.get("/list").then(res=>{
    this.arr=res.data
    
  })
     
    
  
 
  },
};
</script>

<style scoped lang="scss">
 .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
.van-swipe-item{
  width: 100%;
  height: 200px;
}
</style>